#!/usr/bin/python
# -*- coding: utf-8 -*-
import pathlib
import subprocess

for file in pathlib.Path("../scel").glob("*.scel"):
    subprocess.run(["/usr/bin/scel2org5", str(file), "-o", f"./txt/{file.stem}.txt"])

for file in pathlib.Path("./txt").glob("*.txt"):
    subprocess.run(["/usr/bin/libime_pinyindict", str(file), f"./dict/{file.stem}.dict"])
